#include <iostream>
#include <map>
#include <sstream>
#include <string>
#include "Interpreter.h"
#include "Parser.h"
#include "Command.h"

using namespace std;

// Number of files
#define N 20

// Static member initialization
map<const string,const Command*> Parser::mapCmd;

int main()
{
	// Map generation
	Parser::GenerateCmdMap();

	// get instance
	Interpreter *ip = Interpreter::getInstance();

    // Start interpreting file1.txt,...,fileN.txt
	stringstream out;
	string filename = "";
	for (int i=1;i<=N;i++)
	{
		out << "file" << i << ".txt";
		filename = out.str();
		out.str("");
		out.clear();
		ip->startInterpret(filename.c_str());
	}
 	system("pause");
    return 0;
}
